home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Games Collection 1 / software vault.zip / software vault / CDR10 / YICN23.ZIP / INCLUDE / ACTOR.H next >
C/C++ Source or Header  |  1993-01-16  |  1KB  |  42 lines

  1. #ifndef ACTOR.H
  2.  
  3. #define ACTOR.H
  4.  
  5. #include "animicon.h"
  6. #include "animap.h"
  7. #include "script.h"
  8.  
  9. #define MAX_ICONS 20
  10.  
  11. class event;
  12.  
  13. class animactor : public animslave, public script
  14. {
  15. public:
  16.   byte myIconNumber;  // what do we look like?
  17.   byte myIdentity;    // ...and what ARE we?
  18.   word mapX, mapY; //position on parent map
  19.   int lastMapX, lastMapY;
  20.   byte squareX, squareY; //position on map square, so we can move finely
  21.   animactor * nextActor;
  22.   animactor * spawningActor;
  23.   animactor * spawnedActor;
  24.   animap * mymap;
  25.   static animicon * actorIcons;
  26.   animactor() : animslave() {nextActor = spawnedActor = spawningActor = NULL; mymap = NULL; mapX = mapY = squareX = squareY = myIconNumber = 0;}
  27.   virtual void * isInSquare(byte identity);
  28.   void put(int x, int y);
  29.   void remove(void);
  30.   void fineMoveRel(int x, int y);
  31.   void moveTo(int x, int y);
  32.   int hit(animactor * target);
  33.   virtual void advance();
  34.   virtual void show(int x, int y, word pagebase);
  35.   virtual void draw(int x, int y, word pagebase);
  36.   virtual void spawn(animactor * spawnactor);
  37.   virtual void assignIcon(byte iconNumber, byte identity = 255);
  38.   virtual void turn(byte idirection) {};
  39.   static void loadActor(int position, char far * filename, yakLib * myYakLib = NULL);
  40. };
  41.  
  42. #endif